/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package subversion;

/**
 *
 * @author Agustin Suaña
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int sum = 0;
        int a = 0, b = 0, c = 0, d = 0;
        for (int i = 1000; i <= 9999; i++) {
            a = i / 1000;
            b = (i / 100) % 10;
            c = (i % 100) / 10;
            d = (i % 100) % 10;
            sum = a + b + c + d;
            System.out.println(i + "->" + a + "->" + b + "->" + c + "->" + d + "->" + sum);

        }
    }

}
